class Skill:
    def __init__(self,name,time,power):
        self.name=name
        self.__time=time
        self.__power=power
        self.__consume=100
    @property
    def time(self):
        return self.__time

    @time.setter
    def time(self, value):
        if self.__time<0 or self.__time>120:
            print("冷却不合法!")
            return
        else:
            self.__time=value
    @property
    def power(self):
        return self.__power

    @power.setter
    def power(self, value):
        if self.__power < 0 or self.__power > 120:
            print("攻击力度不合法!")
            return
        else:
            self.__power=value
    @property
    def consume(self):
        return self.__consume
s1=Skill("降龙十八掌",100,999)
print(s1.consume)
print(s1.power)
print(s1.time)
print(s1.name)